<?php
/**
 * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
 * @copyright Copyright (c) 2014 Zend Technologies USA Inc. (http://www.zend.com)
 */

/**
 * Global Configuration Override
 *
 * You can use this file for overriding configuration values from modules, etc.
 * You would place values in here that are agnostic to the environment and not
 * sensitive to security.
 *
 * @NOTE: In practice, this file will typically be INCLUDED in your source
 * control, so do not include passwords or other sensitive information in this
 * file.
 */
date_default_timezone_set("Asia/Shanghai");
return [
    // 配置短信适配器
    'apigility-communicate' => [
        'sms'=>[
            'adapter' => [
                'type'=> 'aliyun',
                'params' => [
                    'region_id' => 'cn-hangzhou',
                'access_key_id' => 'LTAIjaNSNGP5FWIC',
                'access_key_secret' => '7kS0ljJTYfTHAcLrWqzN3qsyxw3nxP',
                'template_id'=>'SMS_27980047',
                'sign_name' => '我宣你',
            ],
        ],
    ],
    'phone-notify' => [
        'adapter' => [
            'type' =>'jpush',
            'params' => [
                'app_key' => '45f122ab2c88f8c4850442ca',
                    'secret' => '880676d0ad6f83f6d63dc13b',
                    'log_file' => dirname(__FILE__).'/../../data/ApigilityCommunicate/PhoneNotifyServiceAdapter/JPush/log_'.(new \DateTime())->format('Y-m-d_H-i').'.txt'
                ]
            ]
        ]
    ],
    'apigility-vendor-integrate' => [
        'ease-mob' => [
            'enable'=>true,
            'app_key'=>'1112161116178150#wxn',
            'client_id'=>'YXA6YqbjYMf4Eea85meAVjfhDg',
            'client_secret'=>'YXA69VHyaexn-XJ_Qx9mBzs1ifTczbg',
            'server_url'=>'https://a1.easemob.com/1112161116178150/wxn',
            'account_register_password'=>'hunlian123pass',
            'cache_path'=>dirname(__FILE__).'/../../data/ApigilityVendorIntegrate/EaseMob/Cache'
        ],
        'ju-he' => [
    'enable'=>true,
    'app_key'=>'619781682bbaa5576f8fe7fc3ff5abe3',
],
    ],
    'apigility-object-storage' => [
        'adapter'=>[
            'aliyun'=>[
                'enable' => true,
                'params' => [
                    'bucket' => 'hunlianshejiao',
                    'domain-outer'=>'hunlianshejiao.oss-cn-shenzhen.aliyuncs.com',
                    'domain-inner'=>'hunlianshejiao.oss-cn-shenzhen-internal.aliyuncs.com',
                    'access-key'=>'LTAIjaNSNGP5FWIC',
                    'access-secret'=>'7kS0ljJTYfTHAcLrWqzN3qsyxw3nxP',
                    'endpoint'=>'oss-cn-shenzhen.aliyuncs.com'
                ],
            ],
        ],
    ],
    'apigility-order'=>[
        'payment-adapter'=>[
            'alipay'=>[
                'partner'=>'2088521332455534',
                'seller_id'=>'2088521332455534',
                'private_key_path'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Alipay/rsa_private_key.pem',
                'ali_public_key_path'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Alipay/alipay_public_key.pem',
                'ssl_cacert_path'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Alipay/cacert.pem',
                'log_path'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Alipay/Logs'
            ],
            'wxpay'=>[
                'APPID'=>'wx4cbc5520e18ad2da',
                'MCHID'=>'1421838402',
                'KEY'=>'fhfghfghssdfdfghdfghdfghdfghdfgh',
                'APPSECRET'=>'8c72661ebd265d32b9bd48edff888c89',
                'SSLCERT_PATH'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Wxpay/apiclient_cert.pem',
                'SSLKEY_PATH'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Wxpay/apiclient_key.pem',
                'log_path'=>dirname(__FILE__).'/../../data/ApigilityOrder/PaymentAdapter/Wxpay/Logs',
                'notify_url'=> 'https://api.wxn1314.com/order/payment-notification-from-wxpay',
            ]
        ],
    ],
    'zfr_cors' => [
        /**
         * Set the list of allowed origins domain with protocol.
         */
        'allowed_origins' => ['*'],

        /**
         * Set the list of HTTP verbs.
         */
        'allowed_methods' => ['GET', 'POST', 'PATCH', 'DELETE', 'OPTIONS'],

        /**
         * Set the list of headers. This is returned in the preflight request to indicate
         * which HTTP headers can be used when making the actual request
         */
        'allowed_headers' => ['Authorization', 'Content-Type'],

        /**
         * Set the max age of the preflight request in seconds. A non-zero max age means
         * that the preflight will be cached during this amount of time
         */
        // 'max_age' => 120,

        /**
         * Set the list of exposed headers. This is a whitelist that authorize the browser
         * to access to some headers using the getResponseHeader() JavaScript method. Please
         * note that this feature is buggy and some browsers do not implement it correctly
         */
        // 'exposed_headers' => [],

        /**
         * Standard CORS requests do not send or set any cookies by default. For this to work,
         * the client must set the XMLHttpRequest's "withCredentials" property to "true". For
         * this to work, you must set this option to true so that the server can serve
         * the proper response header.
         */
        // 'allowed_credentials' => false,
    ],
];
